<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 200px;
            height: 200px;
            background-color: orange;
            position: absolute;
            z-index: 3;
/*通过z-index可以设置元素的层级，
值必须为整数，数越大，层级越高，就可以覆盖其他元素
但不论怎么样，子元素的层级永远比父元素高*/
        }
        .box2{
            width: 200px;
            height: 200px;
            background-color: purple;
            position: absolute;
            left: 50px;
            top: 50px;
            z-index: 2;
        }
        .box3{
            width: 200px;
            height: 200px;
            background-color: #bfa;
            position: absolute;
            left: 100px;
            top: 100px;
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
</body>
</html>